package Entities;

import java.sql.Date;
import java.util.Objects;

public class DoeBookEntity {
    private String bookId;
    private String bookName;
    private String author;
    private String publisher;
    private String preName;
    private String translator;
    private String date;
    private String pages;
    private String price;
    private String isbn;
    private String star;
    private String contentDes;
    private String authorDes;
    private String tag;
    private String imageUrl;
    private Date lastUpdate;

    public String getBookId() {
        return bookId;
    }

    public void setBookId(String bookId) {
        this.bookId = bookId;
    }

    public String getBookName() {
        return bookName;
    }

    public void setBookName(String bookName) {
        this.bookName = bookName;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getPublisher() {
        return publisher;
    }

    public void setPublisher(String publisher) {
        this.publisher = publisher;
    }

    public String getPreName() {
        return preName;
    }

    public void setPreName(String preName) {
        this.preName = preName;
    }

    public String getTranslator() {
        return translator;
    }

    public void setTranslator(String translator) {
        this.translator = translator;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public String getPages() {
        return pages;
    }

    public void setPages(String pages) {
        this.pages = pages;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public String getIsbn() {
        return isbn;
    }

    public void setIsbn(String isbn) {
        this.isbn = isbn;
    }

    public String getStar() {
        return star;
    }

    public void setStar(String star) {
        this.star = star;
    }

    public String getContentDes() {
        return contentDes;
    }

    public void setContentDes(String contentDes) {
        this.contentDes = contentDes;
    }

    public String getAuthorDes() {
        return authorDes;
    }

    public void setAuthorDes(String authorDes) {
        this.authorDes = authorDes;
    }

    public String getTag() {
        return tag;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public Date getLastUpdate() {
        return lastUpdate;
    }

    public void setLastUpdate(Date lastUpdate) {
        this.lastUpdate = lastUpdate;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        DoeBookEntity that = (DoeBookEntity) o;
        return Objects.equals(bookId, that.bookId) &&
                Objects.equals(bookName, that.bookName) &&
                Objects.equals(author, that.author) &&
                Objects.equals(publisher, that.publisher) &&
                Objects.equals(preName, that.preName) &&
                Objects.equals(translator, that.translator) &&
                Objects.equals(date, that.date) &&
                Objects.equals(pages, that.pages) &&
                Objects.equals(price, that.price) &&
                Objects.equals(isbn, that.isbn) &&
                Objects.equals(star, that.star) &&
                Objects.equals(contentDes, that.contentDes) &&
                Objects.equals(authorDes, that.authorDes) &&
                Objects.equals(tag, that.tag) &&
                Objects.equals(imageUrl, that.imageUrl) &&
                Objects.equals(lastUpdate, that.lastUpdate);
    }

    @Override
    public int hashCode() {

        return Objects.hash(bookId, bookName, author, publisher, preName, translator, date, pages, price, isbn, star, contentDes, authorDes, tag, imageUrl, lastUpdate);
    }
}
